A hypothetical creature created for a thought experiment. Maxwell’s demon, if it existed, would act as a sort of gate guard by sorting between higher-energy molecules and lower-energy molecules within an enclosed space. Because such a sorting process would tend to decrease entropy, it would violate the second law of thermodynamics.